VERSION 5.00
Object = "{194DB270-5D32-4614-93B7-0568F1AC965A}#1.0#0"; "ComUnionComponent.tlb"
Begin VB.Form frmComUnionNavigationSetup 
   BackColor       =   &H00F7D9C2&
   BorderStyle     =   0  'None
   Caption         =   "Modules and Navigation Setup"
   ClientHeight    =   7995
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   12000
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmComUnionNavigationSetup.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   7995
   ScaleWidth      =   12000
   ShowInTaskbar   =   0   'False
   Begin ComUnionComponentCtl.NavSystemStructure NavSystemStructure1 
      Height          =   7935
      Left            =   0
      TabIndex        =   0
      Top             =   15
      Width           =   11715
      Object.Visible         =   "True"
      Enabled         =   "True"
      ForegroundColor =   "-2147483630"
      BackgroundColor =   "16243138"
      CurrentMode     =   "Normal"
      BackColor       =   "194, 217, 247"
      Font            =   "Tahoma, 8.25pt"
      ForeColor       =   "ControlText"
      Location        =   "0, 1"
      Name            =   "SystemStructure"
      Size            =   "781, 529"
      Object.TabIndex        =   "0"
   End
End
Attribute VB_Name = "frmComUnionNavigationSetup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Public sBit As String

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean

'Form mode enumeration
Enum eNVMode
    Normal
    AddNewEdit
    Find
End Enum
Public Mode As eNVMode


Private Sub Form_Activate()
    TBBitReload
End Sub

Private Sub Form_Load()
    Set FrmName = Me
    AcessBit Me, GetValueFrTable("AccessLevel", "SEC_ACCESSLEVEL", "RoleID = '" & SecUserRole & "' AND [Module] = 'SC08'")
    FormSetup
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, lACNew, lACEdit, lACDelete, , , , , , , , , , True
    'BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , , , , True
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set frmComUnionNavigationSetup = Nothing
    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    ITGLedgerMain.tbrMain.Buttons("btnFind").ButtonMenus("btnFindP").Enabled = False
    
End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
End Sub


'Close active window
Public Sub TBCloseWindow()
    If Mode = Normal Then
        Unload Me
    End If
End Sub

Public Sub TBDelete()
    If Mode = AddNewEdit Then Exit Sub
    
    NavSystemStructure1.Delete

End Sub

Public Sub TBEdit()
    If Mode = AddNewEdit Then Exit Sub
    If NavSystemStructure1.Edit Then
        BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , True, True
        Mode = AddNewEdit
    End If
End Sub

Public Sub TBNew()
    If Mode = AddNewEdit Then Exit Sub
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , True, True
    NavSystemStructure1.Add
    Mode = AddNewEdit
End Sub

Public Sub TBSave()
    If Mode = Normal Then Exit Sub
    If NavSystemStructure1.Save Then
        sBit = "1110000000001000"
        TBBitReload
        Mode = Normal
    End If
End Sub

Public Sub TBUndoAll()
    If Mode = Normal Then Exit Sub
    sBit = "1110000000001000"
    TBBitReload
    NavSystemStructure1.Cancel
    Mode = Normal
End Sub
